package com.lang.integers;

public class ConvertHexToDecimalExample {
	public static void main(String[] args) {

		// declare string containing hexadecimal number
		String strHexNumber = "20";

		/*
		 * to convert hexadecimal number to decimal number use, int parseInt
		 * method of Integer wrapper class.
		 * 
		 * Pass 16 as redix second argument.
		 */

		int decimalNumber = Integer.parseInt(strHexNumber, 16);
		System.out.println("Hexadecimal number converted to decimal number");
		System.out.println("Decimal number is : " + decimalNumber);

	}
}
